import {defineStore} from 'pinia'

const useUserStore = defineStore('user', {
    state: () => {
        return {
            userMsg: {},
            platform: 'PC'
        }
    },
    actions: {
        setUserMsg(data: object) {
            this.userMsg = data
        },
        setPlatform(data: string) {
            this.platform = data;
        }
    },
    persist: {
        enabled: true,
    }
})

// @ts-ignore
export default useUserStore
